﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Guoc.BigMall.Infrastructure.Extension;
namespace Guoc.BigMall.Infrastructure.WeChat.Entitys
{
    /// <summary>
    ///  基础消息
    /// </summary>
    [XmlRoot("xml")]
   public class AbstractMessage
    {
      // [XmlElement("ToUserName")]
       public string ToUserName { get; set; }
       //[XmlElement("FromUserName")]
       public string FromUserName { get; set; }
       public long CreateTime { get; set; }
       public string MsgType { get;set; }

       public static long ConvertDateTimelong(System.DateTime time)
       {
           System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
           return (long)(time - startTime).TotalSeconds;
       }

       public string getTextMessage()
       {
           return "text";
       }

    }
}
